package com.mflex.mwms.adapter;

import android.app.Activity;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.mflex.mwms.R;
import com.mflex.mwms.model.Task;
import com.mflex.mwms.model.TaskDetail;

import java.util.List;

public class StockTaskAdapter extends BaseAdapter {
    List<String> items;
    Activity context;

    public StockTaskAdapter(Activity context, List<String> items) {
        this.context = context;
        this.items = items;
    }

    @Override
    public int getCount() {
        return items.size();
    }

    @Override
    public Object getItem(int position) {
        return items.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        String item = items.get(position);
        View view = convertView;
        view = context.getLayoutInflater().inflate(R.layout.item_stock_task_list, null);
        ((TextView) view.findViewById(R.id.txtTaskNo)).setText(item);


        return view;
    }
}